﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniErp.Entity.DataStreams.DOs.Notice
{
    /// <summary>
    /// 公告信息实体
    /// </summary>
    [Table("Notices")]
    public class Notices : BaseEntity
    {
        /// <summary>
        /// 公告编号
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [ConcurrencyCheck]
        public int NoticesId { get; set; }

        /// <summary>
        /// 公告标题
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string Title { get; set; }

        /// <summary>
        /// 公告内容
        /// </summary>
        [Required]
        public string Bcontent { get; set; }
        /// <summary>
        /// 公告是否需要回复
        /// </summary>
        public bool IsReply { get; set; }

        /// <summary> 
        /// 修改时间
        /// </summary>
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }
        #region 导航属性
        /// <summary>
        /// 公告编写人工号
        /// </summary>
        public int UserInfoId { get; set; }
        public virtual UserInfo UserInfo { get; set; }

        public virtual List<JobsNotices> JobsNotices { get; set; }

        public virtual List<UserInfoNoticesReply> NoticesRecords { get; set; }
        #endregion

    }


}
